<template>
  <PCard class="sipi-bank-con" :isCardBorder="false" :shadow="'never'" :isHeadBottomBorder="true"
    :bodyStyle="{ width: '100%' }">
    <div slot="header" class="bank-title">
      <span>开户资料</span>
    </div>
    <div class="data-list">
      <div class="data-item">
        <div class="item-label">开户行：</div>
        <div class="item-value">{{khh}}</div>
      </div>
      <div class="data-item">
        <div class="item-label">财务信息</div>
        <div class="item-value"></div>
      </div>
      <div class="data-item pl">
        <div class="item-label pll">财务姓名：</div>
        <div class="item-value">{{cwxm}}</div>
      </div>
      <div class="data-item pl">
        <div class="item-label pll">财务实名手机号：</div>
        <div class="item-value">{{cwsjh}}</div>
      </div>
    </div>
  </PCard>
</template>

<script>
export default {
  name: 'sipiBank',
  props:{
    pageInfo:{type:Object}
  },
  data(){
    return {
      khh:'上海浦东发展银行（荆州分行营业部）',
      cwxm:'财务1',
      cwsjh:'财务实名手机号'
    }
  },
  watch:{
    pageInfo: {
      handler(val) {
        if(Object.prototype.toString.call(val)==='[object Object]'){
          const {pageData,dbData} = val
          dbData && ( this.khh =  dbData.bankName || '--')
          dbData && ( this.cwxm =  dbData.financialName || '--')
          dbData && ( this.cwsjh =  dbData.phone || '--')
        }
      },
      deep: true,
      immediate: true
    },
  },
}
</script>

<style lang="less">
.sipi-bank-con {
  .bank-title {
    font-size: 20px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #333333;
  }

  .data-list {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;

    .data-item {
      width: 100%;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      height: 30px;
      line-height: 30px;
      &.pl{
        padding-left: 10px;
      }
      .item-label {
        width: 130px;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #666666;
        line-height: 20px;
        &.pll{
          width: 120px;
        }
      }

      .item-value {
        width: 400px;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #333333;
        line-height: 20px;
      }
    }
  }
}
</style>
